<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<h2 class="formHeader" id="profileFormHeader">Edit Your Profile</h2>
<form:form method="POST" commandName="profileForm"
	action="/film_rental/user/profile/update" id="profileForm">
	<table class="formTable">
		<tr class="formRow">
			<td class="formCell"><form:label path="storeId">Preferred Store</form:label></td>
			<td class="formCell"><form:select path="storeId">
					<form:option value="NONE" label="--- Select a Store ---" />
					<form:options items="${storeMap}" />
				</form:select></td>
			<td class="formCell"><form:errors path="storeId"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="firstName">First Name</form:label></td>
			<td class="formCell"><form:input path="firstName"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="firstName"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="lastName">Last Name</form:label></td>
			<td class="formCell"><form:input path="lastName"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="lastName"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="email">Email Address</form:label></td>
			<td class="formCell"><form:input path="email" /></td>
			<td class="formCell"><form:errors path="email" cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="addressLine1">Address Line 1</form:label></td>
			<td class="formCell"><form:input path="addressLine1"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="addressLine1"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="addressLine2">Address Line 2</form:label></td>
			<td class="formCell"><form:input path="addressLine2" /></td>
			<td class="formCell"><form:errors path="addressLine2"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="district">State or Province</form:label></td>
			<td class="formCell"><form:input path="district"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="district"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="cityName">City</form:label></td>
			<td class="formCell"><form:input path="cityName"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="cityName"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="countryId">Select a Country</form:label></td>
			<td class="formCell"><form:select path="countryId"
					cssClass="required">
					<form:option value="NONE" label="--- Select a Country ---" />
					<form:options items="${countryMap}" />
				</form:select></td>
			<td class="formCell"><form:errors path="countryId"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="postalCode">Postal Code</form:label></td>
			<td class="formCell"><form:input path="postalCode" /></td>
			<td class="formCell"><form:errors path="postalCode"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td class="formCell"><form:label path="phoneNumber">Phone Number</form:label></td>
			<td class="formCell"><form:input path="phoneNumber"
					cssClass="required" /></td>
			<td class="formCell"><form:errors path="phoneNumber"
					cssClass="error" /></td>
		</tr>
		<tr class="formRow">
			<td colspan="2" class="formCell"><input type="submit"
				value="Save Changes" class="formButton" /></td>
		</tr>
	</table>
</form:form>
